Skip to main content

MPesa All API

POST https://api.manka.tz/api/v1/analysis/all

This analyses the pdf and responds with the Tausi's 1d analysis, 2d analysis, 3d analysis and Affordability score both in one call. The response is in a json format.

Header Requirements

  • Authorization --required

Body Params

  • file --required
  • fullname --required
curl example request
curl -X 'POST' 'https://api.manka.tz/api/v1/analysis/all'
-F fullname=Hussein \
-F 'file=@Vodacom_4435535_Statement.pdf' \
-H 'Authorization: Bearer XXXXXXXXXXX' \'

Response Sample

  1. Status OK Response
200 OK
{
"profile": {
"account": "2557XXXXXXXX",
"contacts": "2557XXXXXXXX",
"company": "Vodacom",
"start_date": "2024-06-01T08:35:00",
"end_date": "2024-10-29T10:32:00",
"no_of_transactions": 981,
"in_types": [
"bank_to_wallet",
"agent_deposit",
"p2p_received",
"other"
],
"out_types": [
"luku",
"p2p_sent",
"wallet_to_bank",
"agent_withdrawal",
"lipa",
"bill_payment",
"other"
],
"loan_services": [
"songesha",
"mpawa",
"chomoka",
"mgodi"
],
"pars_3d": {
"agent_activity": {
"debit": [
"agent_withdrawal"
],
"credit": [
"agent_deposit"
]
},
"peer_to_peer_activity": {
"debit": [
"p2p_sent"
],
"credit": [
"p2p_received"
]
},
"bank_activity": {
"debit": [
"wallet_to_bank"
],
"credit": [
"bank_to_wallet"
]
},
"loan_activity": {
"debit": [
"songesha",
"mpawa",
"chomoka",
"mgodi"
]
},
"bills_activity": {
"debit": [
"bill_payment",
"luku",
"gepg"
]
},
"lipa_info": {
"debit": [
"lipa"
]
},
"other": {
"debit": [
"other"
],
"credit": [
"other"
]
}
},
"channels": {}
},
"1d_analysis": {
"initial_info": {
"account_number": "255756339626",
"first_date": "2024-06-01 08:35:00",
"last_date": "2024-10-29 10:32:00",
"total_days": 151,
"total_active_days": 106
},
"customer_profile": {
"wallet_balance": 0.04,
"total_turnover": 43060444.0,
"total_transactions": 981
},
"cash_flow_summary": {
"total_turnover": 43060444.0,
"total_cashin": 21676377.0,
"total_cashout": 21384067.0,
"cashin_to_turnover_percentage": 50.34,
"cashin_transactions": 335,
"cashin_to_total_trans_percentage": 34.15,
"cashout_to_turnover_percentage": 49.66,
"cashout_transactions": 646,
"cashout_to_total_trans_percentage": 65.85
},
"songesha_info": {
"total_amount_songesha_disbursed": 5339305.0,
"max_amount_songesha_disbursed": 183920.0,
"number_of_songesha_disbursements": 255,
"average_songesha_disbursement_amount": 20938.45,
"last_day_of_songesha_disbursement": "2024-10-29 10:32:00",
"last_songesha_disbursement_amount": 10000.0,
"total_amount_songesha_repaid": 5722356.0,
"max_amount_songesha_repaid": 197714.0,
"number_of_songesha_repayments": 293,
"average_songesha_repayment_amount": 19530.23,
"last_day_of_songesha_repayment": "2024-10-29 10:10:00",
"last_songesha_repayment_amount": 30000.0
},
"mpawa_info": {
"total_amount_mpawa_disbursed": 0,
"max_amount_mpawa_disbursed": 0,
"number_of_mpawa_disbursements": 0,
"average_mpawa_disbursement_amount": 0,
"last_day_of_mpawa_disbursement": "N/A",
"last_mpawa_disbursement_amount": 0,
"total_amount_mpawa_repaid": 0,
"max_amount_mpawa_repaid": 0,
"number_of_mpawa_repayments": 0,
"average_mpawa_repayment_amount": 0,
"last_day_of_mpawa_repayment": "N/A",
"last_mpawa_repayment_amount": 0
},
"chomoka_info": {
"total_amount_chomoka_disbursed": 0,
"max_amount_chomoka_disbursed": 0,
"number_of_chomoka_disbursements": 0,
"average_chomoka_disbursement_amount": 0,
"last_day_of_chomoka_disbursement": "N/A",
"last_chomoka_disbursement_amount": 0,
"total_amount_chomoka_repaid": 0,
"max_amount_chomoka_repaid": 0,
"number_of_chomoka_repayments": 0,
"average_chomoka_repayment_amount": 0,
"last_day_of_chomoka_repayment": "N/A",
"last_chomoka_repayment_amount": 0
},
"mgodi_info": {
"total_amount_mgodi_disbursed": 0,
"max_amount_mgodi_disbursed": 0,
"number_of_mgodi_disbursements": 0,
"average_mgodi_disbursement_amount": 0,
"last_day_of_mgodi_disbursement": "N/A",
"last_mgodi_disbursement_amount": 0,
"total_amount_mgodi_repaid": 0,
"max_amount_mgodi_repaid": 0,
"number_of_mgodi_repayments": 0,
"average_mgodi_repayment_amount": 0,
"last_day_of_mgodi_repayment": "N/A",
"last_mgodi_repayment_amount": 0
},
"bank_to_wallet": {
"total_bank_to_wallet_amount": 3005499.0,
"maximum_bank_to_wallet_amount": 990000.0,
"no_of_bank_to_wallet_transactions": 29,
"average_bank_to_wallet_amount": 103637.9,
"last_day_paid_bank_to_wallet": "2024-10-09 07:00:00",
"last_bank_to_wallet_amount": 20000.0
},
"agent_deposit": {
"total_agent_deposit_amount": 4560000.0,
"maximum_agent_deposit_amount": 1500000.0,
"no_of_agent_deposit_transactions": 9,
"average_agent_deposit_amount": 506666.67,
"last_day_paid_agent_deposit": "2024-10-22 03:09:00",
"last_agent_deposit_amount": 300000.0
},
"p2p_received": {
"total_p2p_received_amount": 6944688.0,
"maximum_p2p_received_amount": 2000000.0,
"no_of_p2p_received_transactions": 25,
"average_p2p_received_amount": 277787.52,
"last_day_paid_p2p_received": "2024-10-26 10:01:00",
"last_p2p_received_amount": 310000.0
},
"other": {
"total_other_amount": 5445096.0,
"maximum_other_amount": 1500000.0,
"no_of_other_transactions": 71,
"average_other_amount": 76691.49,
"last_day_paid_other": "2024-10-29 10:10:00",
"last_other_amount": 30000.0
},
"luku": {
"total_luku_amount": 85000.0,
"maximum_luku_amount": 20000.0,
"no_of_luku_transactions": 6,
"average_luku_amount": 14166.67,
"last_day_paid_luku": "2024-09-23 05:27:00",
"last_luku_amount": 15000.0
},
"p2p_sent": {
"total_p2p_sent_amount": 2687500.0,
"maximum_p2p_sent_amount": 600000.0,
"no_of_p2p_sent_transactions": 55,
"average_p2p_sent_amount": 48863.64,
"last_day_paid_p2p_sent": "2024-10-27 02:20:00",
"last_p2p_sent_amount": 13000.0
},
"wallet_to_bank": {
"total_wallet_to_bank_amount": 225000.0,
"maximum_wallet_to_bank_amount": 135000.0,
"no_of_wallet_to_bank_transactions": 3,
"average_wallet_to_bank_amount": 75000.0,
"last_day_paid_wallet_to_bank": "2024-10-21 07:13:00",
"last_wallet_to_bank_amount": 135000.0
},
"agent_withdrawal": {
"total_agent_withdrawal_amount": 622500.0,
"maximum_agent_withdrawal_amount": 260000.0,
"no_of_agent_withdrawal_transactions": 18,
"average_agent_withdrawal_amount": 34583.33,
"last_day_paid_agent_withdrawal": "2024-10-09 07:59:00",
"last_agent_withdrawal_amount": 8000.0
},
"lipa": {
"total_lipa_amount": 2273800.0,
"maximum_lipa_amount": 135000.0,
"no_of_lipa_transactions": 110,
"average_lipa_amount": 20670.91,
"last_day_paid_lipa": "2024-10-29 10:32:00",
"last_lipa_amount": 9500.0
},
"bill_payment": {
"total_bill_payment_amount": 6149700.0,
"maximum_bill_payment_amount": 2000000.0,
"no_of_bill_payment_transactions": 107,
"average_bill_payment_amount": 57473.83,
"last_day_paid_bill_payment": "2024-10-28 10:30:00",
"last_bill_payment_amount": 7000.0
},
"transaction_channels": {},
"statement_check": {
"isvalid": true
}
},
"2d_analysis": {
"total_cash_inflow": 21676377.0,
"cash_inflow": {
"bank_to_wallet": {
"total_amout": 3005499.0,
"percentage_of_total": 13.87
},
"agent_deposit": {
"total_amout": 4560000.0,
"percentage_of_total": 21.04
},
"p2p_received": {
"total_amout": 6944688.0,
"percentage_of_total": 32.04
},
"other_cashin_flow": {
"total_amout": 1826885.0,
"percentage_of_total": 8.43
},
"loan_disbursements": {
"total_amout": 5339305.0,
"percentage_of_total": 24.63
}
},
"total_cash_outflow": 21384067.0,
"cash_outflow": {
"luku": {
"total_amout": 85000.0,
"percentage_of_total": 0.4
},
"p2p_sent": {
"total_amout": 2687500.0,
"percentage_of_total": 12.57
},
"wallet_to_bank": {
"total_amout": 225000.0,
"percentage_of_total": 1.05
},
"agent_withdrawal": {
"total_amout": 622500.0,
"percentage_of_total": 2.91
},
"lipa": {
"total_amout": 2273800.0,
"percentage_of_total": 10.63
},
"bill_payment": {
"total_amout": 6149700.0,
"percentage_of_total": 28.76
},
"other_cashout_flow": {
"total_amout": 3618211.0,
"percentage_of_total": 16.92
},
"loan_repayments": {
"total_amout": 5722356.0,
"percentage_of_total": 26.76
}
}
},
"3d_analysis": {
"analysis_period": {
"start_date": "June_2024",
"end_date": "October_2024"
},
"cash_flow_analysis": {
"cash_inflow": [
{
"month": "June_2024",
"amount": 1290626.0,
"percentage": 5.95
},
{
"month": "July_2024",
"amount": 3902031.0,
"percentage": 18.0
},
{
"month": "August_2024",
"amount": 1321253.0,
"percentage": 6.1
},
{
"month": "September_2024",
"amount": 8294939.0,
"percentage": 38.27
},
{
"month": "October_2024",
"amount": 6867528.0,
"percentage": 31.68
}
],
"cash_outflow": [
{
"month": "June_2024",
"amount": 1272677.0,
"percentage": 5.95
},
{
"month": "July_2024",
"amount": 3842583.0,
"percentage": 17.97
},
{
"month": "August_2024",
"amount": 1295249.0,
"percentage": 6.06
},
{
"month": "September_2024",
"amount": 8174942.0,
"percentage": 38.23
},
{
"month": "October_2024",
"amount": 6798616.0,
"percentage": 31.79
}
]
},
"agent_activity_analysis": {
"agent_withdrawal": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 422000.0,
"percentage": 67.79
},
{
"month": "August_2024",
"amount": 48000.0,
"percentage": 7.71
},
{
"month": "September_2024",
"amount": 144500.0,
"percentage": 23.21
},
{
"month": "October_2024",
"amount": 8000.0,
"percentage": 1.29
}
],
"agent_deposit": [
{
"month": "June_2024",
"amount": 200000.0,
"percentage": 4.39
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 3760000.0,
"percentage": 82.46
},
{
"month": "October_2024",
"amount": 600000.0,
"percentage": 13.16
}
]
},
"peer_to_peer_activity_analysis": {
"p2p_sent": [
{
"month": "June_2024",
"amount": 218500.0,
"percentage": 8.13
},
{
"month": "July_2024",
"amount": 115000.0,
"percentage": 4.28
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 1748000.0,
"percentage": 65.04
},
{
"month": "October_2024",
"amount": 606000.0,
"percentage": 22.55
}
],
"p2p_received": [
{
"month": "June_2024",
"amount": 200000.0,
"percentage": 2.88
},
{
"month": "July_2024",
"amount": 1157576.0,
"percentage": 16.67
},
{
"month": "August_2024",
"amount": 278000.0,
"percentage": 4.0
},
{
"month": "September_2024",
"amount": 484112.0,
"percentage": 6.97
},
{
"month": "October_2024",
"amount": 4825000.0,
"percentage": 69.48
}
]
},
"bank_activity_analysis": {
"wallet_to_bank": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 90000.0,
"percentage": 40.0
},
{
"month": "October_2024",
"amount": 135000.0,
"percentage": 60.0
}
],
"bank_to_wallet": [
{
"month": "June_2024",
"amount": 352500.0,
"percentage": 11.73
},
{
"month": "July_2024",
"amount": 567000.0,
"percentage": 18.87
},
{
"month": "August_2024",
"amount": 202999.0,
"percentage": 6.75
},
{
"month": "September_2024",
"amount": 1845000.0,
"percentage": 61.39
},
{
"month": "October_2024",
"amount": 38000.0,
"percentage": 1.26
}
]
},
"loan_activity_analysis": {
"songesha": [
{
"month": "June_2024",
"amount": 568277.0,
"percentage": 9.93
},
{
"month": "July_2024",
"amount": 1418362.0,
"percentage": 24.79
},
{
"month": "August_2024",
"amount": 694349.0,
"percentage": 12.13
},
{
"month": "September_2024",
"amount": 1760242.0,
"percentage": 30.76
},
{
"month": "October_2024",
"amount": 1281126.0,
"percentage": 22.39
}
],
"mpawa": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
],
"chomoka": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
],
"mgodi": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
]
},
"bills_activity_analysis": {
"bill_payment": [
{
"month": "June_2024",
"amount": 266500.0,
"percentage": 4.33
},
{
"month": "July_2024",
"amount": 1063500.0,
"percentage": 17.29
},
{
"month": "August_2024",
"amount": 334200.0,
"percentage": 5.43
},
{
"month": "September_2024",
"amount": 886000.0,
"percentage": 14.41
},
{
"month": "October_2024",
"amount": 3599500.0,
"percentage": 58.53
}
],
"luku": [
{
"month": "June_2024",
"amount": 15000.0,
"percentage": 17.65
},
{
"month": "July_2024",
"amount": 30000.0,
"percentage": 35.29
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 40000.0,
"percentage": 47.06
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
],
"gepg": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
]
},
"lipa_info_analysis": {
"lipa": [
{
"month": "June_2024",
"amount": 126400.0,
"percentage": 5.56
},
{
"month": "July_2024",
"amount": 730900.0,
"percentage": 32.14
},
{
"month": "August_2024",
"amount": 178200.0,
"percentage": 7.84
},
{
"month": "September_2024",
"amount": 993200.0,
"percentage": 43.68
},
{
"month": "October_2024",
"amount": 245100.0,
"percentage": 10.78
}
]
},
"other_analysis": {
"other": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 881885.0,
"percentage": 48.27
},
{
"month": "August_2024",
"amount": 225000.0,
"percentage": 12.32
},
{
"month": "September_2024",
"amount": 590000.0,
"percentage": 32.3
},
{
"month": "October_2024",
"amount": 130000.0,
"percentage": 7.12
}
]
}
},
"affordability_scores": {
"rank": 2,
"high": 781401.0,
"moderate": 586051.0,
"low": 390701.0
}
}